/*
 * Copyright (c) 2009, Jan Pastor. All Rights Reserved.
 */

package sk.jp.imageio.jpeg;

import java.io.File;
import java.util.List;
import java.util.Set;

/**
 * JPEG Image IO.
 */
public interface JpegImageIo {

    /**
     * Loads image from file.
     * @param file image file.
     * @return image.
     */
    JpegImage loadImage(File file);

    /**
     * Load images from directories (without recursion).
     * @param directories directories of images.
     * @return images.
     */
    List<JpegImage> loadImages(Set<File> directories);

    /**
     * Save image (metadata and image data) to file.
     * @param image image to save.
     * @return saved image with updated information.
     */
    JpegImage saveImage(JpegImage image);

    /**
     * Save image (only metadata) to file.
     * @param image image to save.
     * @return saved image with updated information.
     */
    JpegImage saveImageMetadata(JpegImage image);

}
